import request from '@/utils/request'

// 查询字典下级下拉框选项（有级联关系时）

export const getDictionaryApi = (dictType, parentDictValue) =>
  request.get(
    `/core/dictionary/child-combo-item/list?dictType=${dictType}&&parentDictValue=${parentDictValue}`
  )

// 查询字典
export const getDictionary1Api = (dictType) =>
  request.get(`/core/dictionary/combo-item/list?dictType=${dictType}`)

// 设备树根节点
export const getDeviceRootApi = () =>
  request.get('core/vom/device-tree/root-node/list', {
    params: {
      treeModel: 'DeviceManageTree'
    }
  })

// 设备树子节点
export const getDeviceChildrenApi = (data) =>
  request.post('/core/vom/device-tree/child-node/list', data)

// 用电企业
export const getCompanyApi = () =>
  request.get('/pio-microservice-biz/cbm/organization/company/list')
